package com.prs.crm.domain.flow;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

import com.prs.crm.domain.Attachment;
import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.hr.Person;

/**
 * 流程审批详细,适用于SimpleWorkFlow
 * @author prs.chenzhi
 * @see com.prs.crm.domain.SimpleFlowEntity
 *
 */
@Entity
@Table(name="flow_verifydetail")
public class FlowVerifyDetail extends BaseEntity{

	private static final long serialVersionUID = 1L;

	
	@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	
	@ManyToOne
	private Person executor;
	
	private String opinion;
	
	/**
	 * 审核结果
	 */
	private Integer result;
	
	@ManyToOne
	@Cascade({org.hibernate.annotations.CascadeType.ALL,org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private Attachment attach;

	@ManyToOne
	private WorkFlowAndPerson workFlowAndPerson;
	public WorkFlowAndPerson getWorkFlowAndPerson() {
		return workFlowAndPerson;
	}

	public void setWorkFlowAndPerson(WorkFlowAndPerson workFlowAndPerson) {
		this.workFlowAndPerson = workFlowAndPerson;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getId() {
		return id;
	}

	public void setExecutor(Person executor) {
		this.executor = executor;
	}

	public Person getExecutor() {
		return executor;
	}



	public void setAttach(Attachment attach) {
		this.attach = attach;
	}

	public Attachment getAttach() {
		return attach;
	}

	public void setResult(Integer result) {
		this.result = result;
	}

	public Integer getResult() {
		return result;
	}

	public void setOpinion(String opinion) {
		this.opinion = opinion;
	}

	public String getOpinion() {
		return opinion;
	}
	
	
}
